import service from "@/utils/request"

// 表格数据
export interface ConsumablesEntryFormPort{
    slipNo: string,
    slipDate: string,
    slipReason: string,
    sysDate: string,
    sendNo: string,
    deptName: string,
    vendorName: string,
    mtlNo: string,
    mtlColor: string,
    mtlName: string,
    mtlSpec: null,
    mtlUnit: string,
    qty: Number,
    price: Number,
    amt: Number,
    remark: null,
    chiName: string
}

export interface ConsumablesEntryForm {
    total:Number,
    inDtos:ConsumablesEntryFormPort[]
}

export interface ConsumableParameterInterface {
    deptName:string,
    mtlName:string,
    mtlNo:string,
    pageNum:Number,
    pageSize:Number,
    sendNo:string,
    slipEndDate:string,
    slipNo:string,
    slipReason:string,
    slipStartDate:string,
    sysEndDate:string,
    sysStartDate:string,
    typeNo:string,
    vendorName:string
}

export const ObtainConsumablesEntryFormData  = (parms:ConsumableParameterInterface) => {
    return service.put<any,ConsumablesEntryForm>('/pcFactorQuery/queryPartBfIn',parms)
}

// Find下拉框数据
interface ConsumableDropDownBox{
    reason:[],
    vendor:[],
    dept:[],
    type:ConsumableDropDownBoxType[],
}

interface ConsumableDropDownBoxType{
    typeNo: string,
    typeName: string
}

export const FindDropDownData = () => {
    return service.get<any,ConsumableDropDownBox>('/pcFactorQuery/queryPartBfInBack')
}

